﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SPVisualDev.VSAddin.Dialogs
{
    public partial class DialogElementSelector : Form
    {
        public DialogElementSelector()
        {
            InitializeComponent();
        }

        public string SelectedItem
        {
            get
            {
                if (listView.SelectedItems.Count == 0)
                    return null;

                return listView.SelectedItems[0].Tag as string;
            }
        }

        private void btnSelect_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
